# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1292055671.017415
_template_filename=u'/Users/joeldunham/old/onlinelinguisticdatabase/templates/derived/people/researcher/inputFields.html'
_template_uri=u'/derived/people/researcher/inputFields.html'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['addEditForm', 'settings']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    # SOURCE LINE 1
    ns = runtime.Namespace(u'helper', context._clean_inheritance_tokens(), templateuri=u'/base/helper.html', callables=None, calling_uri=_template_uri, module=None)
    context.namespaces[(__name__, u'helper')] = ns

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, u'helper')._populate(_import_ns, [u'reStructuredTextHelp', u'entityLinkingHelp', u'embeddingFileHelp', u'embeddingFormHelp'])
        __M_writer = context.writer()
        __M_writer(u'\n\n\n')
        # SOURCE LINE 80
        __M_writer(u'\n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_addEditForm(context,addEdit):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, u'helper')._populate(_import_ns, [u'reStructuredTextHelp', u'entityLinkingHelp', u'embeddingFileHelp', u'embeddingFormHelp'])
        entityLinkingHelp = _import_ns.get('entityLinkingHelp', context.get('entityLinkingHelp', UNDEFINED))
        embeddingFormHelp = _import_ns.get('embeddingFormHelp', context.get('embeddingFormHelp', UNDEFINED))
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        session = _import_ns.get('session', context.get('session', UNDEFINED))
        reStructuredTextHelp = _import_ns.get('reStructuredTextHelp', context.get('reStructuredTextHelp', UNDEFINED))
        embeddingFileHelp = _import_ns.get('embeddingFileHelp', context.get('embeddingFileHelp', UNDEFINED))
        app_globals = _import_ns.get('app_globals', context.get('app_globals', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 4
        __M_writer(u'\n<fieldset>\n<legend>User Info</legend>\n<ol>\n <li>\n')
        # SOURCE LINE 9
        if addEdit == 'edit':
            # SOURCE LINE 10
            __M_writer(u'  <label for="username">username <span class="emphasize">(a username cannot be changed)</span></label>\n  <input id="username" maxlength="255" name="username" tabindex="1" type="text" readonly="readonly" />\n')
            # SOURCE LINE 12
        else:
            # SOURCE LINE 13
            __M_writer(u'  <label for="username">username * </label>\n  <input id="username" maxlength="255" name="username" tabindex="1" type="text" />\n')
            pass
        # SOURCE LINE 16
        __M_writer(u' </li>\n')
        # SOURCE LINE 17
        if addEdit == 'edit':
            # SOURCE LINE 18
            __M_writer(u' <li>\n  <label for="password">password <span class="emphasize">(enter a new password or leave blank to retain old one)</span></label>\n  <input id="password" maxlength="255" name="password" tabindex="2" type="password" />\n </li>\n')
            # SOURCE LINE 22
        else:
            # SOURCE LINE 23
            __M_writer(u' <li>\n  <label for="password">password * </label>\n  <input id="password" maxlength="255" name="password" tabindex="2" type="password" />\n </li>\n')
            pass
        # SOURCE LINE 28
        __M_writer(u' <li>\n  <label for="firstName">first name *</label>\n  <input id="firstName" maxlength="255" name="firstName" tabindex="3" type="text" />\n </li>\n <li>\n  <label for="lastName">last name *</label>\n  <input id="lastName" maxlength="255" name="lastName" tabindex="4" type="text" />\n </li>\n <li>\n  <label for="email">email *</label>\n  <input id="email" maxlength="255" name="email" tabindex="5" type="text" />\n </li>\n <li>\n  <label for="affiliation">affiliation</label>\n  <input id="affiliation" maxlength="255" name="affiliation" tabindex="6" type="text" />\n </li>\n</ol>\n</fieldset>\n\n<fieldset>\n<legend>Role</legend>\n<ol>\n')
        # SOURCE LINE 50
        if session['user_role'] == 'administrator':
            # SOURCE LINE 51
            __M_writer(u' <li>\n  <label for="role">role</label>\n  ')
            # SOURCE LINE 53
            __M_writer(escape(h.select(name='role', selected_values='', options=app_globals.roles, tabindex=7)))
            __M_writer(u'\n </li>\n')
            # SOURCE LINE 55
        else:
            # SOURCE LINE 56
            __M_writer(u' <li>\n  <label for="role">role</label>\n  ')
            # SOURCE LINE 58
            __M_writer(escape(h.select(name='role', selected_values='', options=[session['user_role']], tabindex=7)))
            __M_writer(u'\n </li>\n')
            pass
        # SOURCE LINE 61
        __M_writer(u'</ol>\n</fieldset>\n\n<fieldset>\n<legend>Speaker Page Content</legend>\n<ol>\n <li>\n  <textarea class="monospace" id="personalPageContent" cols="40" rows="15"\n            name="personalPageContent" tabindex="8"></textarea>\n  <p class=\'fullyjustified\'>To give formatting and structure to the content,\n  use the reStructuredText ')
        # SOURCE LINE 71
        __M_writer(escape(reStructuredTextHelp()))
        __M_writer(u' markup language.\n  Create HTML links to OLD entities ')
        # SOURCE LINE 72
        __M_writer(escape(entityLinkingHelp()))
        __M_writer(u" using the syntax\n  'form(a)', 'collection(b)', etc., where 'a' and 'b' are IDs.\n  Embed representations of OLD Files ")
        # SOURCE LINE 74
        __M_writer(escape(embeddingFileHelp()))
        __M_writer(u' or Forms\n  ')
        # SOURCE LINE 75
        __M_writer(escape(embeddingFormHelp()))
        __M_writer(u" with 'file[x]' and 'form[y]' respectively</p>\n </li>\n</ol>\n</fieldset>\n\n")
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_settings(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, u'helper')._populate(_import_ns, [u'reStructuredTextHelp', u'entityLinkingHelp', u'embeddingFileHelp', u'embeddingFormHelp'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        app_globals = _import_ns.get('app_globals', context.get('app_globals', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 82
        __M_writer(u'\n ')
        # SOURCE LINE 83

        orthographyOptions = [(u'', u'')] + [(key, \
      app_globals.OLOrthographies[key][0]) for key in \
      app_globals.OLOrthographies if app_globals.OLOrthographies[key][0]]
         
        
        # SOURCE LINE 87
        __M_writer(u"\n <fieldset>\n <legend>Default Collection View</legend>\n <ol>\n  <li>\n   <p>This setting determines how a Collection's content will be displayed\n   by default</p>\n  ")
        # SOURCE LINE 94
        __M_writer(escape(h.select(name='collectionViewType', selected_values='', \
  options=app_globals.collectionViewTypes, tabindex=1)))
        # SOURCE LINE 95
        __M_writer(u'\n  </li>\n </ol>\n </fieldset>\n \n <fieldset>\n <legend>Input Orthography</legend>\n <ol>\n  <li>\n   <p>The selected orthography is that which ')
        # SOURCE LINE 104
        __M_writer(escape(c.researcher.firstName))
        __M_writer(u' ')
        # SOURCE LINE 105
        __M_writer(u'   ')
        __M_writer(escape(c.researcher.lastName))
        __M_writer(u' will use when entering and searching for object ')
        # SOURCE LINE 106
        __M_writer(u'   language data.  If nothing is selected, the system-wide default input ')
        # SOURCE LINE 107
        __M_writer(u'   orthography (')
        __M_writer(escape(app_globals.defaultInputOrthography[0]))
        __M_writer(u') will be used.</p>\n   ')
        # SOURCE LINE 108
        __M_writer(escape(h.select(name='inputOrthography', selected_values='', \
   options=orthographyOptions, tabindex=2)))
        # SOURCE LINE 109
        __M_writer(u'\n  </li>\n </ol>\n </fieldset>\n\n <fieldset>\n <legend>Output Orthography</legend>\n <ol>\n  <li>\n   <p>The selected orthography is that which be used to display object ')
        # SOURCE LINE 119
        __M_writer(u'   language data to ')
        __M_writer(escape(c.researcher.firstName))
        __M_writer(u' ')
        __M_writer(escape(c.researcher.lastName))
        __M_writer(u'.  If ')
        # SOURCE LINE 120
        __M_writer(u'   nothing is selected, the system-wide default output orthography ')
        # SOURCE LINE 121
        __M_writer(u'   (')
        __M_writer(escape(app_globals.defaultOutputOrthography[0]))
        __M_writer(u') will be used.\n   </p>\n   ')
        # SOURCE LINE 123
        __M_writer(escape(h.select(name='outputOrthography', selected_values='', \
   options=orthographyOptions, tabindex=3)))
        # SOURCE LINE 124
        __M_writer(u'\n  </li>\n </ol>\n </fieldset>\n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


